<template>
	<view class="recrd">
		<view class="textr">
			<u-parse :html="datatlis.content"></u-parse>
		</view>
		<view class="watch_itme">
			<view class="watch_top">
				<view class="sum">1</view>
				<view class="title">
					  <view>观看视频</view>
					  <view>观看教学视频，更加有助于闯关哦</view>
				</view>
				<view class="b_text" @click="vodedata">观看视频</view>
			</view>
			<view class="boders"></view>
			<view class="watch_top">
				<view class="sum">2</view>
				<view class="title">
					  <view>上传作业</view>
					  <view>进入上传闯关作业，等待老师批复。</view>
				</view>
				<view class="b_text" @click="NavUplod">上传作业</view>
			</view>
		</view>
		<view class="b_list">
			<product_list :type="1"/>
		</view>
	</view>
</template>

<script>
	import { cour_detail , cour_today } from '@/core/api/index.js'
	export default{
		data(){
			return{
					content: `
						<img src="../../static/image.png@2x (1).png" />
					`,
					datatlis:{}
			}
		},
		onLoad(r) {
			console.log(r)
			this.cour_detail(r.id)
			this.cour_today_list(r.id)
		},
		methods:{
			async cour_detail(id){
				const { _data } = await cour_detail({id})
				this.datatlis = _data
			},
			vodedata(){
				uni.navigateTo({
					url:'/pages/barrier/video_list'
				})
			},
			async cour_today_list(id){
				const { _data } = await cour_today({id})
			},
			NavUplod(){
				uni.navigateTo({
					url:'/pages/barrier/homework?id=' + this.datatlis.id
				})
			}
		}
	}
</script>
<style>
	page{
		background-color: #f5f5f5;
	}
</style>
<style lang="scss" scoped>
	.textr{
		width: 100%;
		background-color: #fff;
	}
	.watch_itme{
		background-color: #fff;
		padding: 26rpx 30rpx;
		margin: 10rpx 0;
		.watch_top{
			display: flex;
			align-items: center;
			.sum{
				width: 52.57rpx;
				height: 52.57rpx;
				opacity: 1;
				display: flex;
				align-items: center;
				justify-content: center;
				background: rgba(235, 236, 237, 1);
				border-radius: 50%;
				// font-weight: bold;
				font-size: 30rpx;
			}
			.title{
				margin-left: 30rpx;
				& view:nth-child(1){
					font-size: 30rpx;
				}
				& view:nth-child(2){
					font-size: 26rpx;
					margin-top: 15rpx;
					color: rgba(153, 153, 153, 1);
				}
			}
			.b_text{
				flex: 1;
				text-align: right;
				padding-right: 20rpx;
				font-size: 28rpx;
				color: rgba(255, 115, 0, 1);
			}
		}
		.boders{
			border: 2rpx solid rgba(245, 245, 245, 1);
			width: 90%;
			margin: 30rpx auto;
		}
	}
	.b_list{
		
	}
</style>